<div class="layui-card-body">
    <form class="layui-form" action="{:url()}" style="width: 700px;height: 500px;" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">关键字</label>
            <div class="layui-input-block">
                <input type="text" name="keyword" value="{$info.keyword|default=''}" class="layui-input" autocomplete="off" placeholder="输入*号为默认回复信息">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">图文消息</label>
            <div class="layui-input-block">
                <select name="msg_id" xm-select="customer" xm-select-radio  xm-select-search="{:url('list_msg')}"  >
                </select>
            </div>
        </div>
        <input type="hidden" name="id" value="{$info.id|default=''}" id="img">
    </form>

</div>
<link rel="stylesheet" href="https://cdn.weibuyun.com/static/admin/plugins/formSelects-v4.css">
<script charset="utf-8" src="https://cdn.weibuyun.com/static/admin/plugins/wangeditor/wangEditor.min.js"></script>
<script type="text/javascript">
    layui.use(['form', 'layer', 'formSelects', 'upload'], function () {
        var form = layui.form
            , formSelects = layui.formSelects
            , $ = layui.$
            ,upload=layui.upload;
        //执行实例
        var uploadInst = upload.render({
            elem: '#test1',
            url: '{:url("/file/upload",["type"=>"image"])}',
            done: function (res) {
                var input = '#test1';
                $(input).closest('.avatar-add').find('.loading').hide();
                if (res.code == 0) {
                    $(input).closest('.avatar-add').find('img').attr('src', res.data.src);
                    $('#img').val(res.data.src);
                } else {
                    layer.msg(res.msg);
                }
            }

        });
        formSelects.config('customer', {
            clearInput: true,          //当有搜索内容时, 点击选项是否清空搜索内容, 默认不清空
            keyVal: 'id',
            keyName: 'title',
            success: function (id, url, searchVal, result) {      //使用远程方式的success回调

            },

        });

    });
</script>






